<template>
  <div class="wrapper">

    <i-tab-bar i-class='deviceTab' :current="current" @change="handleChange">
      <i-tab-bar-item key="detail" icon="homepage_fill" current-icon="activity_fill" title="设备信息">
      </i-tab-bar-item>
      <i-tab-bar-item key="display" icon="barrage_fill" current-icon="computer_fill" title="数据展示">
      </i-tab-bar-item>
    </i-tab-bar>

    <div class="content">
      <DeviceDetail v-if="current === 'detail'" :productID="sendID"></DeviceDetail>
    </div>

    <i-message id="message" />

  </div>
</template>

<script>

import store from '../store/store'
import { request } from '@/utils/index'
import { transProtocol } from '@/utils/dict'

import DeviceDetail from '../components/DeviceDetail'

const { $Message } = require('../../../static/dist/base/index')

export default {
  components: { DeviceDetail },

  data () {
    return {
      current: 'detail',
      deviceID: 1,
      productID: 1
    }
  },
  onLoad (options) {

  },
  methods: {
  },
  computed: {
    token () {
      return 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzUzNzA0MTAsImlkIjoyMCwib3JpZ19pYXQiOjE1MzUzNjY4MTB9.XEkWK1i3gTgY72VC7eh-dcLkg-2MAVtlNvM_c0Vl4rFwsVgqxM0iBmShTwke-hGuLtUFmxGMbA1L7d_0CTUDjQs0vx9ByX_r8G_mAU3mQrcovSdjf7nUT30pPSi2_ehSM4ruc_VUWke9XPE86osk6RAZgYfOuEY5PHn0LI6cKeo'
      // return store.state.token
    },
    sendID () {
      return this.productID
    }
  }
}
</script>

<style>
.content {
  height: calc(100% - 100rpx);
}
.deviceTab {
  box-shadow: 0 1px 3px rgba(26,26,26,.1);
}
</style>
